import { requestNotice } from '@/service'
import { onMounted, ref } from 'vue'
function useNotice(configId, callback) {
  const notice = ref<string>('')
  const fetch = async () => {
    const result: any = await requestNotice({ configId })
    notice.value = result.data
  }
  onMounted(async () => {
    await fetch()
    callback()
  })
  return { notice }
}
export default useNotice
